package com.javaenzk.wfx.manager.dao;

import com.javaenzk.wfx.manager.po.SysModule;
import com.javaenzk.wfx.manager.po.User_Info;
import com.javaenzk.wfx.manager.vo.LeafNode;
import com.javaenzk.wfx.manager.vo.ParentNode;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.shiro.authc.AuthenticationException;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface UserDAO {


    User_Info findByUserName(@Param("username") String username);

    List<SysModule> queryAllModuld();

    List<SysModule> queryHasModuld(String account);

    List<String> queryAllModuleName(String account);

    List<ParentNode> queryParentNodes(String roleCode);
    List<String> queryFuncByUser(String account);

    List<LeafNode> queryLeafNodes(@Param("moduleName") String moduleName,@Param("roleCode") String roleCode);

   void addSysmodule(@Param("moduleCode") String[] moduleCode,@Param("roleId") String roleId);

   void delSysmodule(@Param("moduleCode") String[] moduleCode,@Param("roleId") String roleId);
}
